import {createRouter, createWebHistory, RouteRecordRaw} from 'vue-router'

// @ts-ignore
const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        component: () => import('@/views/Main.vue'),
        redirect:'/axios',
        children: [
            {
                path: '/axios',
                component: () => import('@/views/main/main-axios.vue')
            },
            {
                path: '/vue-route',
                component: () => import('@/views/main/main-vue-router.vue')
            },
            {
                path: '/pinia',
                component: () => import('@/views/main/main-pinia.vue')
            },
            {
                path: '/less',
                component: () => import('@/views/main/main-less.vue')
            },
            {
                path: '/mock',
                component: () => import('@/views/main/main-mock.vue')
            }
        ],
    },
    
]

const router = createRouter({
    history: createWebHistory(),
    routes
})
export default router